<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
			uni.getNetworkType({
				success(res){
					if (res.networkType == 'none') {
						uni.showModal({
							title: '网络链接失败',
							content: '检测到网络权限可能设置为关闭，您可以在“设置”中检查无线数据及蜂窝移动网络',
							success: function (res) {
								if (res.confirm) {
									plus.runtime.restart();
								} else if (res.cancel) {
									console.log('用户点击取消');
								}
							}
						})
					}
				},
				fail(err){
					console.log(err);
				}
			})
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import './uni_modules/xingluo-ui/index.scss';
	@import "@/static/icons/xl-uni.css";
	.bg{
		padding-bottom: 100rpx;
		.title{
			height: 40rpx;
			line-height: 40rpx;
			border-left: 5px solid #0a93ff;
			padding-left: 10rpx;
			margin: 40rpx 20rpx;
			font-size: 30rpx;
			color: #0a93ff;
		}
		.content{
			padding: 0 30rpx;
			.title{
				margin: 40rpx 0;
			}
		}
	}
</style>
